package com.hmkj.core.mapper.suggestion;

import com.hmkj.common.baseMapper.GenericMapper;
import com.hmkj.core.model.suggestion.SuggestionModel;
import com.hmkj.core.po.suggestion.Suggestion;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 问题反馈相关Dao接口<br>
 *
 * @author eproo
 * @date 2018-07-07 02:52:40
 */
public interface SuggestionMapper extends GenericMapper<Suggestion, Integer> {
    @Select("SELECT t.*,b.user_name AS 'b.userName' FROM s_suggestion t LEFT JOIN biz_user b on t.user_id=b.id WHERE 1=1 ${whereSql} ${sortSql} limit ${nowPage}, ${pageSize} ")
    List<SuggestionModel> findListBySqlJoin(Map<String, Object> params);

    @Select("SELECT count(1) FROM s_suggestion t LEFT JOIN biz_user b on t.user_id=b.id WHERE 1=1 ${whereSql}")
    long countBySqlJoin(Map<String, Object> params);

}
